
/*
 * .
 * All Rights Reserved.
 */
package com.model.demo.designmodel.prototype.simple;

import java.util.List;

/**
 * ConcretePrototype
 *
 * @author Liao Dongshan, 2019年05月14日
 *
 */
public class ConcretePrototype implements Prototype{

    private String name;

    private int age;

    private List<String> hobbies;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public List<String> getHobbies() {
        return hobbies;
    }

    public void setHobbies(List<String> hobbies) {
        this.hobbies = hobbies;
    }

    @Override
    public Prototype clone( ) {
        ConcretePrototype target=new ConcretePrototype();
        target.age=this.age;
        target.name=this.name;
        target.hobbies=this.hobbies;
        return target;
    }
}
